package com.hx.netty.chat.server.handler;

import com.hx.netty.chat.protocol.ImMsg;
import com.hx.netty.chat.server.processor.MsgProcessor;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.SimpleChannelInboundHandler;

/**
 * @author Huathy
 * @date 2021-10-28 22:23
 * @description
 */
public class TerminalServerHandler extends SimpleChannelInboundHandler<ImMsg> {
    private MsgProcessor processor= new MsgProcessor();


    @Override
    protected void channelRead0(ChannelHandlerContext ctx, ImMsg msg) throws Exception {
       processor.process(ctx.channel(),msg);
    }
}
